﻿using MediatR;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using S.Common.Enums.Organization;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using S.Authorization.Domain.Model.Authority;
using S.Authorization.Domain.Model.Organization;

namespace S.Authorization.API.Application.Command.OrganizationCommand
{
    public class ColumnManagementCreateCommand:IRequest<bool>
    {
        /// <summary>
        /// 栋舍类型（下拉框）（唯一）
        /// </summary>
        public BuildingEnum BuildingTypes { get; set; }

        /// <summary>
        /// 栋舍名称
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string BuildingName { get; set; }

        /// <summary>
        /// 负责人（用于以负责人维度汇总栋舍绩效使用）
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string ResponsiblePerson { get; set; }

        /// <summary>
        /// 生产人员（用于移动端查看我管理的栋舍使用）
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? ProductionPersonnel { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public bool State { get; set; }
        /// <summary>
        /// 备注
        /// </summary>

        public string? Remark { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 羊场编码
        /// </summary>
        public int SheepFarmCode { get; set; }

        /// <summary>
        /// 羊场全称
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string SheepFarm { get; set; }
    }
    public class FieldModelCreateCommand:IRequest<int>
    {
        public List<FieldModel> FieldModel { get; set; }
    }
    public class ColumnManagementDelete:IRequest<int>
    { 
        public int BuildingManagementId { get; set; }
    }
    public class FieldModelDelete:IRequest<int>
    {
        public int ColumnManagementId { get; set; }
    }
    public class ColumnDeleteMore:IRequest<string>
    {
        public string? Ids { get; set; }
    }
    public class ColumUpdate:IRequest<int>
    {
        public int BuildingManagementId { get; set; }
        /// <summary>
        /// 栋舍类型（下拉框）（唯一）
        /// </summary>
        public int BuildingTypes { get; set; }
        /// <summary>
        /// 栋舍名称
        /// </summary>
        public string BuildingName { get; set; }

        /// <summary>
        /// 负责人（用于以负责人维度汇总栋舍绩效使用）
        /// </summary>

        public string ResponsiblePerson { get; set; }

        /// <summary>
        /// 生产人员（用于移动端查看我管理的栋舍使用）
        /// </summary>

        public string? ProductionPersonnel { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public bool State { get; set; }
        /// <summary>
        /// 备注
        /// </summary>

        public string? Remark { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        public string? UpdateBy { get; set; }


        public int SheepFarmCode { get; set; }

    }
}
